#include "Hexagon.h"


Hexagon::Hexagon(void)
{
}

void Hexagon::initPoints() {
	PoligonScreenPosition* calculator = new PoligonScreenPosition(getScale(), getType(), getRotation(), getX_position(), getY_position());

	points.clear();

	points.push_back(new Position(calculator->getVerticeOneX(), calculator->getVerticeOneY()));
	points.push_back(new Position(calculator->getVerticeTwoX(), calculator->getVerticeTwoY()));
	points.push_back(new Position(calculator->getVerticeThreeX(), calculator->getVerticeThreeY()));
	points.push_back(new Position(calculator->getVerticeFourX(), calculator->getVerticeFourY()));
	points.push_back(new Position(calculator->getVerticeFiveX(), calculator->getVerticeFiveY()));
	points.push_back(new Position(calculator->getVerticeSixX(), calculator->getVerticeSixY()));
}
void Hexagon::setScale(float scale){
	this->scale = scale;
}
float Hexagon::getScale(){
	return this->scale;
}

Figure* Hexagon::clone() {
	Hexagon* figure = new Hexagon();
	
	figure->setScale(this->scale);
	figure->set_position(this->getX_position(), this->getY_position());
	figure->setColor(this->getColor());
	figure->setRGBColor(this->getRedComponent(), this->getGreenComponent(), this->getBlueComponent());
	figure->setInitialRotation(this->getRotation());
	figure->setRotation(0);
	figure->setStaticFlag(this->is_static());
	figure->setMass(this->getMass());

	return figure;
}

Hexagon::~Hexagon(void)
{
}
